New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use containerd restart manager to monitor services #3168
Conversation
Please sign your commits following these rules: $ git clone -b "restart_monitor" git@github.com:kkroo/linuxkit.git somewhere
$ cd somewhere
$ git commit --amend -s --no-edit
$ git push -f Amending updates the existing PR. You DO NOT need to open a new one. |
Hi, we can't merge PRs unless they are signed-off-by as per instructions above. I think restart policy should probably be configurable. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure this is using the provided interfaces correctly, I can't seem to find any other examples (there seem to be none in the containerd tree, e.g. in ctr
), but it certainly looks suspiciously racy to me as is.
containerd/containerd#2318 shows it using
It seems like it is for containerd internal functionality not 3rd party use (as much as some linuxkit containers could be considered "system level containers"). |
d4b515d
to
5eb1260
Compare
Addressing comments regarding race conditions. Regarding the use of this interface, it is a plugin with public interfaces and seems very well suited for improving the availability of linuxkit's system services. |
5eb1260
to
cdf964f
Compare
This needs to be configurable for each service. Not all those who wander are lost. Not all services that stop are broken. |
Long running services are typically ones where any exit code would be anomalous. Yes, we need to continue to support one off execution. This change would obviously change that and restart each |
@medic15 and @justincormack are correct, this needs to be configurable per service. I still have concerns regarding this use of a plugin which is "The usecase is for system level containers" and "Its not built for the kube or docker restart policies, just a simple internal function to keep low level system containers running". Whether or not it happens to currently meet the use case here if we are using it outside its "support envelope" we have no guarantee that it will continue to be suitable in the future. I'd be happy to be overruled by the other maintainers on that though. |
At present a few of the services we run may terminate (eg |
My use case involves populating a Redis in-memory database using data from several disparate sources. This can't be done in the |
@medic15 yes that seems a reasonable use case where it should be configurable. |
Signed-off-by: Omar Ramadan <omar.ramadan93@gmail.com>
cdf964f
to
1d1c8fc
Compare
@medic15 @justincormack I still don't understand the use case and why such a one-off can't be added to the end of the In any case, I've added a boolean flag |
Services are not started until all |
closing this as there was no activity for over a year and some changes were requested. |
- What I did
Adds system service uptime monitor that restarts stopped system services periodically (default is 10 seconds)
- How I did it
Integrate containerd containerd/containerd#2318
Requires
CONTAINERD_COMMIT
v1.2.0- How to verify it
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)